var rootview = ui("$");
var do_App = sm("do_App");
var do_Page = sm("do_Page");
var nf = sm("do_Notification");
var http = require("helper/http");
var openHelper = require("helper/open");
var pubUrl = require("url/pub");
var httpUrl=pubUrl.url.promotion.list;
//ui
var alayout=ui("alayout");
var bannerScroll = alayout.add("crollbanner","source://view/reuse/banner/banner.ui", 0, 0);
var bannerScrollf = ui("crollbanner");
rootview.setMapping({   // 此处的Mapping只能设置在 RootView 上 ;
    "alayout.tag" : "bannerList"
});
var bannerTag="";
var isBanLoaded = false;
rootview.on("dataRefreshed", function(){
	if(bannerTag!=alayout.tag){
		getBanner();
	}
	bannerTag=alayout.tag;
});
function getBanner(){
	bannerScrollf.fire("bannerSc", JSON.parse(alayout.tag));
}